import { pget, ppostJson } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 获取调拨列表
export function getAllocationnoList(query?: any) {
  return pget(`${modalApi.storage}/allocationno/list`, query);
}

// 新增调拨
export function addAllocationno(data: any) {
  return ppostJson(`${modalApi.storage}/allocationno/save`, data);
}

// 修改调拨
export function editAllocationno(data: any) {
  return ppostJson(`${modalApi.storage}/allocationno/update`, data);
}

// 查看调拨详情
export function allocationnoInfo(id: string) {
  return pget(`${modalApi.storage}/allocationno/detail/${id}`);
}

// 获取调拨车辆列表
export function getAllocationcarList(query?: any) {
  return pget(`${modalApi.storage}/allocationcar/list`, query);
}

// 调拨取消
export function allocationnoCancel(query: any) {
  return pget(`${modalApi.storage}/allocationno/cancel`, query);
}

// 获取费用项列表
export function getCostList(query?: any) {
  return pget(
    `${modalApi.common}/shopec-expense-item-maintenance/expenseitemmaintenance/page`,
    query,
  );
}
